﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Pavilion.DesignerTool
{
    public class EraserTool : IDrawTool
    {
        public string Name { get { return this.GetType().Name; } }
        public float Size { get { return brushTool.Size; } set { brushTool.Size = value; } }
        public int Opacity { get { return brushTool.Opacity; } set { brushTool.Opacity = value; } }

        private BrushTool brushTool;

        public EraserTool()
        {
            brushTool = new BrushTool();
            brushTool.Size = 5;
            brushTool.BrushColor = Color.Transparent;
        }

        public void Load()
        {
            brushTool.Load();
        }

        public void BeginExecution(DrawingBoardData data)
        {
            brushTool.BeginExecution(data);
        }

        public void Execute(DrawingBoardData data)
        {
            brushTool.Execute(data);
        }

        public void EndExecution(DrawingBoardData data, Action creatUndoPointAction)
        {
            brushTool.EndExecution(data, creatUndoPointAction);
        }

        public void DrawInterface(DrawingBoardData data)
        {
            brushTool.DrawInterface(data);
        }
    }
}
